Distributed system is the predominant architecture of Information Technologies (IT) systems for running software applications in the recent years. There are many definitions for distributed system and all of them share one characterizing element—a plurality of nodes where a software application is executed. The nodes are usually separate servers, similar in configuration, communicating with each other. In one of the possible distributed system implementation scenarios, the plurality of server nodes are combined in a cluster.
In general, distributed systems provide an environment for executing an application to process various user requests, sent by a number of users through different kinds of client applications, including web browsers. Usually, processing a user request requires access to a backend system (“backend” for short). Hence, a distributed system has to be connected to and has to communicate with a backend system. For that reason, on each server node, where a connection request could be processed, a communication framework to provide access to one or more backend systems is implemented. Examples of backend systems include databases, middleware messaging systems, legacy enterprise systems, etc.
When the software application processes a connection request that needs to access a backend, the connection framework creates a connection object, or simply a connection, to logically handle the physical link between the application and the backend. After the connection request is completed, the connection framework destroys the connection. However, the creation of an exclusive connection per connection request is not resource efficient. Therefore, it is preferable for the connection framework to create and maintain a set of reusable connections to a backend. Thus, a connection is created once and used many times to provide access to a backend for a plurality of connection requests.
During runtime it is possible for a connection to a backend to become invalid. Many reasons may cause invalidation of a connection, e.g. the backend is down, power instability, network failure, timeout events, etc. The invalid connection cannot be reused, even if the cause for invalidation is eliminated (the backend is up again, the network is fixed, etc.), because the logical relationship with the backend once broken cannot be reestablished. Hence, if a connection is not valid, it has to be destroyed. However, generally the identification and destruction of such invalid connections only occurs when that connection is requested and determined to be invalid.